1: | x - 0 | → x | |
2: | s(x) - s(y) | → x - y | |
3: | 0 ≤ y | → true | |
4: | s(x) ≤ 0 | → false | |
5: | s(x) ≤ s(y) | → x ≤ y | |
6: | if(true,x,y) | → x | |
7: | if(false,x,y) | → y | |
8: | perfectp(0) | → false | |
9: | perfectp(s(x)) | → f(x,s(0),s(x),s(x)) | |
10: | f(0,y,0,u) | → true | |
11: | f(0,y,s(z),u) | → false | |
12: | f(s(x),0,z,u) | → f(x,u,z - s(x),u) | |
13: | f(s(x),s(y),z,u) | → if(x ≤ y,f(s(x),y - x,z,u),f(x,u,z,u)) | |
14: | s(x) -# s(y) | → x -# y | |
15: | s(x) <=# s(y) | → x <=# y | |
16: | PERFECTP(s(x)) | → F(x,s(0),s(x),s(x)) | |
17: | F(s(x),0,z,u) | → F(x,u,z - s(x),u) | |
18: | F(s(x),0,z,u) | → z -# s(x) | |
19: | F(s(x),s(y),z,u) | → IF(x ≤ y,f(s(x),y - x,z,u),f(x,u,z,u)) | |
20: | F(s(x),s(y),z,u) | → x <=# y | |
21: | F(s(x),s(y),z,u) | → F(s(x),y - x,z,u) | |
22: | F(s(x),s(y),z,u) | → y -# x | |
23: | F(s(x),s(y),z,u) | → F(x,u,z,u) | |